[Programming Problem] N-ary Tree Level Order Traversal

Given an n-ary tree, return the level order traversal of its nodes’ values. [Problem Link] Pretty straightforward BFS traversal logic. Here are some small gotcha’s: Add condition for empty/undefined input. When you return the list of lists, the expectation is to return just values and not the Node object. Notice the last line (ret.map(..)) is … Continue reading [Programming Problem] N-ary Tree Level Order Traversal